README – Replication Package for *Defending the Status Quo? How Reelection Shapes Criminal Collusion in Mexico*

1. Citation
Weller, Adee. "Defending the Status Quo? How Reelection Shapes Criminal Collusion in Mexico." British Journal of Political Science. Forthcoming.
Replication data DOI: https://doi.org/10.7910/DVN/EEBY8K

2. Overview
This replication package contains all data and code necessary to reproduce the analyses, tables, and figures presented in the published article. The paper investigates how mayoral reelection in Mexico influences collusion between local politicians and organized criminal groups, with a focus on differences between criminally entrenched and non-entrenched municipalities.

The R scripts implement:
- Difference-in-differences and triple-difference estimations
- Event study specifications
- Supplementary analysis with alternative criminal presence measures
- Governance quality outcomes
- Audit selection and outcomes
- Additional crime-type outcomes
- Mapping visualizations of treatment and criminal presence
- Analysis of fatality data

3. File Manifest
/code/
  replication.R                # Master R script for all analyses
  non_lethal.R		       # Comparison of fatal and non-fatal violence rates

/data/
  stacked_data.csv              # Main analysis dataset
  annual_data.csv               # Year-level dataset
  encig_*.csv / .dbf            # Governance quality survey data (ENCIG)
  mx_panel.csv                  # Supplementary criminal group data (Esberg)
  criminal_groups.csv           # Supplementary criminal group data (Esberg)
  mex_admbnda_govmex_*.shp      # Municipality shapefiles
  mex_admbnda_govmex_*.dbf      # Shapefile metadata
  political_violence.csv        # reports of criminal violence

4. Software and Environment
- R version: 4.3.0
- Key packages: tmap, dplyr, plm, fixest, kableExtra, stargazer, ggplot2, modelsummary, did, fwildclusterboot, bacondecomp, spdep, sf, lfe, did2s, didimputation, readr, foreign, stringi
- GIS: Requires sf package and shapefile data in /data/

5. Replication Instructions
  1. Set working directory in the script to the root folder containing /data/ and /code/.
  2. Ensure all packages are installed — the script will check and install missing ones.
  3. Run replication.R to:
    - Load datasets and prepare analysis panels
    - Estimate main models
    - Generate all figures 
  4. The code reproduces all results in the console and/or RStudio Viewer.
   Tables are printed directly (via modelsummary or stargazer) and figures 
   are displayed in the plotting window. The replication package does not
   automatically save outputs as files — users wishing to save them should
   modify the script accordingly.

6. Mapping Script Outputs to Paper
- Table 1–3: Main treatment effect estimates and audit outcomes
- Tables A3–A8: Event study estimates and ATT differences
- Tables A11–A16: Additional governance, audit selection, and crime-type results
- Figures A1–A8: Spatial distributions, ATT visualizations, and event study plots

7. Data Description
- Unit of analysis: Municipality–year (ADM2_PCODE, Year)
- Temporal coverage: Varies by dataset; core panel is 2012–2023
- Geographic coverage: All municipalities in Mexico
- Key variables:
  - Bin, stag_ind_bin: Treatment timing indicators
  - Poppies: Binary indicator of opium poppy cultivation presence
  - Bin_attacks2, Bin_inc, Bin_chal: Outcome indicators for attacks against all candidates, incumbents, challengers
  - Governance indicators from ENCIG (e.g., corrup_muni, water_safe)
  - Audit variables (if_audit, Audit_found)
  - Crime outcomes (Secuestro, Extorsion, Homicidio.doloso, Robo.a.negocio)

8. Data Access Notes
Some source data are derived from third-party datasets:
- ENCIG surveys: Instituto Nacional de Estadística y Geografía (INEGI) — [https://www.inegi.org.mx/programas/encig/2023/]
- Esberg J. Criminal fragmentation in Mexico. Political Science Research and Methods. Published online 2025:1-8. [doi:10.1017/psrm.2025.4]
- Votar Entre Balas. Civic Data, Mexico Evaluates, and Animal Político. (2024). [https://votar-entre-balas.datacivica.org/]
- Shapefiles of municipalities: [https://www.igismap.com/download-mexico-shapefile-free-boundary-line-polygon/]

9. License
- Code: MIT License
- Data: CC BY 4.0 (unless otherwise noted for third-party sources)

10. Contact
For questions about the replication package:
Adee Weller — adee.weller@emory.edu
